import BaseScene from "./BaseScene";

const {ccclass, property, menu} = cc._decorator;

@ccclass
@menu("Scene/BeginScene")
export default class BeginScene extends BaseScene {
    @property(cc.ProgressBar)
    pb_progress: cc.ProgressBar = null;

    @property(cc.Label)
    lb_tips: cc.Label = null;
    // LIFE-CYCLE CALLBACKS:

    onLoad () {
        super.onLoad();

        this.pb_progress.progress = 0;
        this.lb_tips.string = "";
    }

    async start () {
        await this.checkUpdate();
        await this.login();
        await this.preloadResources();

        this.enterNextScene();
    }

    // update (dt) {}

    private async checkUpdate(){

    }

    private async login(){

    }

    private async preloadResources(){

    }

    private enterNextScene(){
        cc.director.loadScene("game");
    }
}